package com.mantou.proxyadapter.pool;

import java.util.ArrayList;
import java.util.List;

public class CleanConfig {
	private int number;
	private List<Integer> acceptCode;
	private long delay;
	private double connectrate;
	
	public static CleanConfig buildDefault(){
		ArrayList<Integer> acceptcodes = new ArrayList<Integer>();
		acceptcodes.add(200);
		return new CleanConfig()
		.setNumber(20)
		.setAcceptCode(acceptcodes)
		.setDelay(5000)
		.setConnectrate(0.01);
	}
	
	public int getNumber() {
		return number;
	}
	public CleanConfig setNumber(int number) {
		this.number = number;
		return this;
	}
	public List<Integer> getAcceptCode() {
		return acceptCode;
	}
	public CleanConfig setAcceptCode(List<Integer> acceptCode) {
		this.acceptCode = acceptCode;
		return this;
	}
	public long getDelay() {
		return delay;
	}
	public CleanConfig setDelay(long delay) {
		this.delay = delay;
		return this;
	}
	public double getConnectrate() {
		return connectrate;
	}
	public CleanConfig setConnectrate(double connectrate) {
		this.connectrate = connectrate;
		return this;
	}
	
}
